<h2>Page <a class="btn" href="<?php echo $CFG->config['base_url']?>page/admin/new_page">Ajouter</a></h2>


<div id="ajax-response"></div>
<ul class="breadcrumb">
	<li class="all"><a class="current" href="<?php echo $CFG->config['base_url']?>product/admin">Tous <span class="count">(<?php echo $total?>)</span></a> |</li>
	<li class="publish"><a href="<?php echo $CFG->config['base_url']?>product/admin/index/status/publish">Activé <span class="count">(<?php echo $totalActive?>)</span></a></li>
</ul>
<form method="post" action="" id="posts-filter"  class="form-inline">

<p class="pull-right">
  <input type="search" value="" name="s" id="post-search-input" class="input-medium search-query">
   <button type="submit" class="btn" id="search-submit">Chercher Article</button>
</p>

			<select name="action">
				<option selected="selected" value="0">Actions Groupées</option>
				<option class="hide-if-no-js" value="edit">Modifier</option>
				<option value="trash">Déplacer dans la Corbeille</option>
			</select>
			<select name="filter[date]">
				<option value="0" selected="selected">Toutes Dates</option>
				<?php 
				foreach($option_filter_date as $list){
					$s=$list->YearMonth==$filter['date']?' selected ' : '';
					echo "<option value='{$list->YearMonth}' $s>{$list->month} - {$list->year}</option>";
				}
				?>
			</select>
			<button type="submit" class="btn" id="post-query-submit">Filtrer</button>
<span class="displaying-num"><?php echo $totalActive?> Pages</span>


<table class="table">
	<thead>
	<tr>
		<th><input type="checkbox" id="cb-select-all-1" title="Tout" /></th>
		<th id="Titre">
			<a href="#" onclick="sort('title')"> Titre & Texte <span class="icon-chevron-down"></span></a>
			<input id="sort_col" type="hidden" value="<?php echo $sort['title']?>" name="sort[title]" />
		</th>
		<th>Nom de page</th>
		<th>Mots Clés</th>
        <th>Date Créa</th>
        <th>Vue</th>
    </tr>
	</thead>

	<tfoot>
	<tr>
		<th id="Tout"><input type="checkbox" id="cb-select-all-1" title="Tout" /></th>
		<th id="Titre">
			<a href="#" onclick="sort('title')"> Titre & Texte <span class="icon-chevron-down"></span></a>
			<input id="sort_col" type="hidden" value="<?php echo $sort['title']?>" name="sort[title]" />
		</th>
		<th>Nom de page</th>
		<th>Mots Clés</th>
        <th>Date Créa</th>
        <th>Vue</th>
	</tr>
	</tfoot>

	<tbody id="the-list">
	<?php 
	if(!empty($listAllProducts))
		foreach ($listAllProducts as $page){

	?>
		<tr valign="top" id="post-<?php echo $page->id?>">
			<th>
				<input type="checkbox" value="<?php echo $page->id?>" name="post[]" id="cb-select-<?php echo $page->id?>">
			</th>
			<td>
				<a title="Modifier <?php echo $page->title?>" href="<?php echo $CFG->config['base_url']?>page/admin/edit/<?php echo $page->id?>" class="row-title"><?php echo $page->title?></a>
				
				<?php echo $page->metadescription ?>
				<div class="row-actions">
				<span class="edit"><a title="Modifier page" href="<?php echo $CFG->config['base_url']?>page/admin/edit/<?php echo $page->id?>">Modifier</a> | </span>
				<span class="view"><a rel="permalink" title="Voir <?php echo $page->name?>" href="<?php echo $CFG->config['base_url'].$page->page_link.".html"?>">Apperçu</a></span></div>
			</td>
			<td><?php echo $page->name?></td>
			<td><?php echo $page->metakeywords?></td>
			<td><?php echo date('d/m/Y',$page->date_create)?></td>
        	<td><?php echo $page->page_counter?></td>
		</tr>
		<?php }?>
	</tbody>
</table>

</form>